<template>
  <div>计数: <n-input-number v-model:value="count" /></div>
</template>

<script setup lang="ts">
import { ref, watch } from 'vue'
import { countEmitter } from '../eventBus'

const count = ref(10)
watch(count, (nv) => {
  console.log('watch result:', nv)
  countEmitter.emit('childACountChange', nv)
})
countEmitter.on('childACountChange', (e) => {
  console.log('@@@ childACountChange', e)
})
</script>

<style scoped></style>
